//
// Created by Administrator on 2025/7/2.
//int a...
#include <cstdarg>
#include "Test5.h"
#include <vector>

void Ns5::test6Foo(int a, ...) {
    //动态参数
    va_list myarg;
    int b = va_arg(myarg, int);
    std::cout << b;
}

int Ns5::test6Foo1(int *a, std::string c) {
    return 0;
}

int *Ns5::test6Foo2() {
    int *a = new int(2);
    return a;
}

void Ns5::main2() {
    auto *v = new std::vector<int>({1, 2, 3});
    auto begin = v->begin();
    auto end = v->end();
    while (begin != end) {
        std::clog << *begin << " ";
        begin ++;
    }
    delete v;
}

void Ns5::main3() {
    const char *c = "dawd";
    Test5C1 t{1, c};
    Test5C1 t2{1, c};

    Test5C1 *tar[2] = {&t, &t2};
    Test5C1 **a = &tar[0];
}
